#!/usr/local/bin/python
# -*- coding: utf-8 -*-
from models import *
from assoce.core.models import Activite

def getParamInt(activite, name, default):
    return int(getParamStr(activite, name, str(default)))

def getParamStr(activite, name, default):
    s, created = ParamActivite.objects.get_or_create(activite__label=activite, nom__name=name, defaults={'value':default})
    return s.value